package cn.itcast.nems.journal.dto;

import cn.itcast.nems.studentrecord.dao.condition.ApprovalType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
public class JournalFinalDTO implements Serializable {
    /**
     * 主键ID;前缀+6位随机字符（大写字母+数字），示例：JK-I2Z8D8
     */
    private String id;

    /**
     * 审批单ID
     */
    private String formId ;

    /**
     * 学科ID;结课目标班级所属
     */
    private String subjectId;

    /**
     * 学科名称;结课目标班级所属
     */
    private String subjectName;

    /**
     * 校区ID;结课目标班级所属
     */
    private String campusId;

    /**
     * 校区名称;结课目标班级所属
     */
    private String campusName;

    /**
     * 授课模式ID;结课目标班级所属
     */
    private String modelId;

    /**
     * 授课模式名称;结课目标班级所属
     */
    private String modelName;

    /**
     * 结课目标班级ID
     */
    private Integer clazzId;

    /**
     * 结课目标班级名称
     */
    private String clazzName;

    /**
     * 当前在班学生人数
     */
    private Integer studentQuantity;

    /**
     * 本次结课人数
     */
    private Integer finalQuantity;

    /**
     * 班级开班日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @JsonSerialize(using = LocalDateSerializer.class)
    @JsonDeserialize(using = LocalDateDeserializer.class)
    private LocalDate startDate;

    /**
     * 班级预计结课日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @JsonSerialize(using = LocalDateSerializer.class)
    @JsonDeserialize(using = LocalDateDeserializer.class)
    private LocalDate planFinalDate;

    /**
     * 实际结课日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @JsonSerialize(using = LocalDateSerializer.class)
    @JsonDeserialize(using = LocalDateDeserializer.class)
    private LocalDate actualFinalDate;

    /**
     * 特殊申请;枚举值：非特殊｜0、特殊｜1
     */
    private Boolean specialFlag;

    /**
     * 状态;枚举值：草稿｜DRAFT、待审批｜PENDING、审批中｜APPROVING、审批未通过｜REJECTED、已完成｜FINISHED
     */
    private String state;

    /**
     * 备注
     */
    private String remark;

    /**
     * 凭单创建人
     */
    private String createdBy ;


    /**
     * 创建时间-开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime createdDatetime ;
}
